{extend name="$base" /}
{block name="resources"}
<link rel="stylesheet" href="WAP_CSS/liMarquee.css">
<link rel="stylesheet" href="WAP_CSS/index_new.css"/>
<link rel="stylesheet" href="WAP_PLUGIN/swiper/css/swiper.min.css"/>
<script src="WAP_PLUGIN/swiper/js/swiper.min.js"></script>
<style>
	.sign-button{
		background-color: #df8f0e !important;
		border-color: #df8f0e !important;
		color: white;
		text-align: center;
		height: 44px;
		line-height: 44px;
		border-radius: 4px;
		margin: 10px auto;
		width: 80%;
	}
	.box_top { width: 100%; margin: auto; overflow: hidden; }
	.home_top {
	position: relative; width: 140%; height: 100%; text-align: center; line-height: 50px;left: -20%;z-index: 99; content: ''; border-radius: 0 0 50% 50%;
	overflow: hidden
	}
	.top-content{
		width: 88%;
	}
	.top_icon_wrapper{
		text-align: center;
	}
	.top_icon_wrapper div{
		margin: 0 auto;
	}
	.new_wrapper{
		padding: 0 10px;
	}
	.navi > .nav-item{
		width: 20%;
		overflow: hidden;
	}

	.navi > .nav-item > div img {
		max-height: 50%;
		max-width: 50%;
		display: block;
		margin: 0 auto 7px;
	}
	.pin-content{
		display: flex;
		flex-wrap: wrap;
	}
	.pin-content-li{

		width: 25%;
		padding: 0 5px;
	}

	.assemble-foot-left{
		height: 20px!important;
	}
	.gooditem{
		background-color: white;
		border-radius: 8px;
		overflow: hidden;
	}
	.info{
		padding: 5px!important;
	}
	.info .goods-info {
		margin: 0px!important;
	}
	.ns-bg-color-gray-fadeout-60 {
		background-color: rgba(255, 255, 255, 1) !important;
	}

	.tra{
		background-color: transparent;
	}

</style>
{/block}
{block name="head_href"}{/block}

{block name="head"}
<header class="ns-header tra" style="display: flex;display: none"  id="search-header">
	<div style="height: 100%;width: 20%;text-align: center">
		<img style="height: 100%" src="/template/wap/default/public/img/index/min_logo.png">
	</div>
	<div style="flex: 1">
		<!-- 搜索栏 -->
		<div class="control-search" style="margin-top: 3px!important;">
			<div class="control-search-input ns-bg-color-gray-fadeout-60">
				<button type="button" class="search-button custom-search-button ns-border-color-gray">{:lang('search')}</button>
				<input type="text" class="search-input custom-search-input ns-text-color-gray" placeholder="{:lang('search_goods')}">
			</div>
		</div>
	</div>
</header>

<header class="ns-header" id="common-header" style="display: none">
	{block name="head_href"}{/block}
	{block name="head_operation"}<!-- <a class="ns-operation">操作</a> -->{/block}
	<h1>{$title}</h1>
</header>
{/block}
{block name="main"}
{php}
$page_layout = api("System.Config.wapPageLayout");
$page_layout = $page_layout['data'];
if(empty($page_layout)){
	$page_layout = array(
            [ "tag" => "banner", "isVisible" => true ], [ "tag" => "search", "isVisible" => true ], [ "tag" => "nav", "isVisible" => true ],[ "tag" => "notice", "isVisible" => true ], [ "tag" => "coupons", "isVisible" => true ], [ "tag" => "games", "isVisible" => true ], [ "tag" => "discount", "isVisible" => true ], [ "tag" => "spell-bargain", "isVisible" => true ], [ "tag" => "spell-group", "isVisible" => true ], [ "tag" => "goods", "isVisible" => true ], [ "tag" => "cube", "isVisible" => true ], [ "tag" => "bottom", "isVisible" => true ]);
}

//WAP端首页浮层
$wap_floating = api('System.Shop.wapFloating');
$wap_floating = $wap_floating['data'];
{/php}
{notempty name="$wap_floating"}
{if condition="$wap_floating['is_show'] == 1"}
<div class="wap-floating">
	<a class="close-wrap" href="javascript:;"><img src="WAP_IMG/index/floating_layer_close.png"></a>
	<a class="img-wrap" href="{$wap_floating['nav_url']}"><img src="{:__IMG($wap_floating.nav_icon)}" alt="浮层图片" /></a>
</div>
{/if}
{/notempty}

<div class="pay-layout">
{foreach name="$page_layout" item="vo" key="k"}

    {if condition="$vo['tag']=='banner'"}

        {if condition="$vo['isVisible']"}
        <!--轮播图-->
            {php}
            $plat_adv_list = api("System.Shop.advDetail",['ap_keyword' => 'WAP_INDEX_SWIPER', 'export_type' => 'data']);
            {/php}
            {notempty name="$plat_adv_list['data']"}
			<div class="box_top">
				<div class="home_top" style="display: flex">
					<div style="width: 0%"></div>
					<div class="top-content"  style="width: 100%">
						<div style="width: 72%;margin: 0 auto;">
							<div class="swiper-container" style="z-index: 99;" >
								<div class="swiper-wrapper">
								{foreach name="$plat_adv_list['data']['advs']" item="vo"}
									<div class="swiper-slide">
										{if is_url($vo['adv_url'])}
										<a href="{$vo['adv_url']}" style="height:{$plat_adv_list['data']['ap_height']}px;line-height:{$plat_adv_list['data']['ap_height']}px;">
										{else/}
										<a href="{:__URL('APP_MAIN' . $vo['adv_url'])}" style="height:{$plat_adv_list['data']['ap_height']}px;line-height:{$plat_adv_list['data']['ap_height']}px;">
										{/if}
											<img src="{:__IMG($vo.adv_image)}" alt="{:lang('carousel_figure')}">
										</a>
									</div>
								{/foreach}
								</div>
							</div>
						</div>
					</div>
					<div style="width: 0%"></div>
				</div>
			</div>
           	{/notempty}
        {/if}
		<div class="top-icon" style="height: 50px;margin-top: -25px;z-index: 999;position: absolute;width: 100%;">
			<div class="new_wrapper" style="flex-wrap: wrap;">
				<div style="display: flex">
					<div class="top_icon_wrapper" style="flex: 1">
						<div style="width: 60%">
							<a href="/index.php?s=/wap/goods/spintuanList#xapp-navigation=0">
								<img src="/template/wap/default/public/img/index/1.png">
							</a>
						</div>
						<div class="top_icon_text">秒杀团</div>
					</div>
					<div class="top_icon_wrapper" style="flex: 1">
						<div style="width: 60%">
							<a href="/index.php?s=/wap/goods/pintuanList#xapp-navigation=0">
								<img src="/template/wap/default/public/img/index/2.png">
							</a>
						</div>
						<div class="top_icon_text">趣拼团</div>
					</div>
					<div class="top_icon_wrapper" style="flex: 1">
						<div style="width: 70%">
							<a href="/index.php?s=/wap/article/teach#xapp-navigation=0">
								<img src="/template/wap/default/public/img/index/3.png">
							</a>
						</div>
						<div class="top_icon_text">新手教程</div>
					</div>
					<div class="top_icon_wrapper" style="flex: 1">
						<div style="width: 60%">
							<a href="/index.php?s=/wap/goods/point#xapp-navigation=0">
								<img src="/template/wap/default/public/img/index/4.png">
							</a>
						</div>
						<div class="top_icon_text">银币中心</div>
					</div>
					<div class="top_icon_wrapper" style="flex: 1">
						<div style="width: 60%">
							<a href="/index.php?s=/wap/article/brand#xapp-navigation=0">
								<img src="/template/wap/default/public/img/index/5.png">
							</a>
						</div>
						<div class="top_icon_text">平台故事</div>
					</div>
				</div>
			</div>
		</div>
		<div style="height: 40px;margin-bottom: 10px"></div>
    {elseif condition="$vo['tag']=='search'"}

        {if condition="$vo['isVisible']"}
        <!-- 搜索栏 -->
        <div class="control-search">
            <div class="control-search-input ns-bg-color-gray-fadeout-60">
                <button type="button" class="search-button custom-search-button ns-border-color-gray">{:lang('search')}</button>
                <input type="text" class="search-input custom-search-input ns-text-color-gray" placeholder="{:lang('search_goods')}">
            </div>
        </div>
        {/if}

    {elseif condition="$vo['tag']=='nav'"}

        {if condition="$vo['isVisible']"}
        <!--导航栏-->
            {php}
            $navigation_list = api("System.Shop.shopNavigationList",['page_index'=>1,'page_size'=>0,'type'=>2,'is_show'=>1,'order' => 'sort desc']);
            $navigation_list = $navigation_list['data']['data'];
            {/php}
            {notempty name="$navigation_list" item="vo"}
	<div class="new_wrapper">
            <nav class="navi" style="border-radius: 8px">
                {foreach name="$navigation_list" item="vo"}
                    {if condition='$vo.nav_type eq 0'}
                    <a class="nav-item" href="{:__URL('APP_MAIN'.$vo.nav_url)}" >
                    {else/}
                    <a class="nav-item" href="{$vo.nav_url}">
                    {/if}
                        <div>
                            <img src="{:__IMG($vo.nav_icon)}">
	                        <span class="ns-text-color-black">{$vo.nav_title}</span>
                        </div>
                    </a>
                {/foreach}
            </nav>
	</div>
            {/notempty}
        {/if}

    {elseif condition="$vo['tag']=='notice'"}

        <!-- 公告 -->
        {if condition="$vo['isVisible']"}
            {php}
            $notice = api("System.Shop.shopNoticeList");
            $notice = $notice['data']['data'];
            {/php}
            {notempty name="$notice"}
			<div class="new_wrapper" style="margin: 10px 0px">
					<input type="hidden" id="hidden_notice_count" value="{$notice|count}">
					<div class="hot ns-border-color-gray-fadeout-50" style="border-radius: 8px">
						<div class="notice-img">
							<img src="WAP_IMG/index/hot.png">
						</div>
						<div class="dowebok dowebok-block">
							<ul>
								{foreach name="notice" id="vo"}
								<li>
									<a href="{:__URL('APP_MAIN/notice/detail?id='.$vo.id)}">{$vo.notice_title}</a>
								</li>
								{/foreach}
							</ul>
						</div>
					</div>
			</div>
            {/notempty}
        {/if}

    {elseif condition="$vo['tag']=='coupons'"}

        {if condition="$vo['isVisible']"}
            <!--优惠券-->
            {php}
            $coupon_list = api("System.Member.canReceiveCouponQuery",['uid'=>$uid]);
            $coupon_list = $coupon_list['data'];
            {/php}
            {notempty name="$coupon_list"}
            <div class="coupon-container">
                <div  class="coupon-all">
                    {volist name="coupon_list" id="vo" }
                   {if condition="$vo.max_fetch == $vo.received_num && $vo.max_fetch != 0"}
	                    <div class="receive-coupons type_color" data-max-fetch="{$vo.max_fetch}" data-received-num="{if !empty($uid)}{$vo.received_num}{else/}0{/if}">
	                        <div class="coupon-left">
	                        	<span class="money-number">￥{$vo['money']}</span>
	                        	<p class="explanation">满{$vo.at_least}可用</p>
	                        </div>
	                        <div class="get ns-text-color coupon-right type_top">已领取</div>
	                    </div>
                    {else/}
                    <div class="receive-coupons" data-max-fetch="{$vo.max_fetch}" data-received-num="{if !empty($uid)}{$vo.received_num}{else/}0{/if}" onclick="couponReceive(this,{$vo.coupon_type_id})">
                        <div class="coupon-left">
                        	<span class="money-number">￥{$vo['money']}</span>
                        	<p class="explanation">满{$vo.at_least}可用</p>
                        </div>
                        <div class="get ns-text-color coupon-right">领取</div>
                    </div>
                    {/if}
                    {/volist}
                </div>
            </div>
            {/notempty}
        {/if}

    {elseif condition="$vo['tag']=='games'"}

        {if condition="$vo['isVisible']"}
        <!--游戏活动-->
            {php}
                $game_list = api("System.Promotion.promotionGamesList",['condition'=>['status' => 1,"is_index_show" => 1 ],'order'=>'game_id desc']);
                $game_list = $game_list['data'];
            {/php}
            {notempty name="$game_list['data']"}
            <div class="promotion-game-content">
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                        {foreach name="$game_list['data']" item="vo"}
                        <div class="swiper-slide">
                            <a href="{:__URL('APP_MAIN/game/index?gid='.$vo['game_id'])}">
                                <img src="{:__IMG($vo['activity_images'])}" >
                            </a>
                        </div>
                        {/foreach}
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
            </div>
            {/notempty}
        {/if}

    {elseif condition="$vo['tag']=='discount'"}

        {if condition="$vo['isVisible']"}
        <!--限时折扣-->
            {php}
            $discount_data = api("System.Goods.newestDiscount");
            $discount = $discount_data['data'];
            {/php}
            {if !empty($discount)}
                <div class="group-list-box">
	                <div class="group-list-box-in">
	                    <div class="controltype" onclick="location.href='{:__URL("APP_MAIN/goods/discount")}'">
	                        <div class="title ns-text-color-black discount-title">
	                        	<!-- <img src="WAP_IMG/index/discoun_title.png" /> -->
	                        	<span class="module-title spike">限时秒杀</span>
	                        </div>
	                        <div class="discount-title-right">
	                        	<time class="remaining-time" starttime="{$discount.start_time|date='Y-m-d H:i:s',###}" endtime="{$discount.end_time|date='Y-m-d H:i:s',###}">
                                      <span class="day ns-bg-color-black">0</span>
                                      <span class="hours">00</span>
                                      <em>:</em>
                                      <span class="min ns-bg-color-black">00</span>
                                      <em>:</em>
                                      <span class="seconds ns-bg-color-black">00</span>
                                  </time>
	                        </div>
	                    </div>
	                    <div class="discount-list">
	                        <ul>
	                            {volist name="$discount['goods_list']" id="vo" key = "k"}
                                    {if $k lt 9}
    	                            <li>
    	                            	 <div class="goods-pic">
    	                                    <a class="nav-item" href="{:__URL('APP_MAIN/goods/detail?goods_id='.$vo['goods_id'])}">
    	                                        <img class="lazy" src="{:__IMG($default_goods_img)}" data-original="{:__IMG($vo['picture_info']['pic_cover_small'])}">
    	                                    </a>
    	                                </div>
    	                                <div class="goods-info">
    	                                    <a href="{:__URL('APP_MAIN/goods/detail?goods_id='.$vo['goods_id'])}">
    	                                        <div class="goods-name">{$vo.goods_name}</div>
    	                                        <span class="goods-price ns-text-color"><i>￥</i>{$vo.promotion_price}</span>
    	                                    </a>
    	                                </div>
    	                            </li>
                                    {/if}
	                            {/volist}
	                        </ul>
	                    </div>
	                </div>
                </div>
            {/if}
        {/if}
    {elseif condition="$vo['tag']=='spell-bargain'"}

      {if condition="$vo['isVisible']"}
    	{if condition="addon_is_exit('NsBargain') == 1"}
    		{php}
    			 $bargain_list = api("NsBargain.Bargain.bargainList",['page_size'=>5]);
    			 $bargain_list = $bargain_list['data'];
    		{/php}
    		{notempty name="$bargain_list['data']"}
	        <!-- 砍价 -->
		    <div class="spelling-block">
			     <header>
			         <div class="ns-text-color-black assemble-title bargain-title"><span class="module-title bargain">疯狂砍价</span></div>
			         <a href="{:__URL('APP_MAIN//goods/bargain')}">更多&nbsp;&gt;</a>
			     </header>
			     <ul>
			         {foreach name="$bargain_list['data']" item="vo" key="k"}
			         <li onclick="location.href='{:__URL('APP_MAIN/goods/detail?goods_id='.$vo.goods_id.'&bargain_id='.$vo.bargain_id)}'">
			             <div>
			                 <img src="{:__IMG($default_goods_img)}" data-original="{:__IMG($vo.pic_cover_mid)}" class="lazy_load pic lazy">
			             </div>
			             <footer class="ns-border-color-gray">
			                 <p class="ns-text-color-black">{$vo.goods_name}</p>
			                 <div class="assemble-tag">
			                 	<div class="people-num ns-text-color">砍价</div>
			                 	{eq name="$vo['shipping_fee']" value="0"}<div class="people-num ns-text-color">包邮</div>{/eq}
			                 </div>
			                 <div class="assemble-foot">
			               	  	<div class="tuangou-money ns-text-color bargain-price">￥{$vo.promotion_price}</div>
			                    <div class="assemble-foot-right">
			                     	<div class="mui-btn mui-btn-danger primary go-bargain">发起砍价</div>
			                     </div>
			                 </div>
			             </footer>
			         </li>
			         {/foreach}
			     </ul>
			 </div>
			 {/notempty}
		 {/if}
      {/if}
    {elseif condition="$vo['tag']=='spell-group'"}

        {if condition="$vo['isVisible']"}
        <!--拼团推荐-->
			{if condition="addon_is_exit('NsPintuan') == 1"}
            {php}

            $pintuan_list = api("NsPintuan.Pintuan.goodsList",['page_size'=>100,'tuan_type'=>3,'condition'=> json_encode(['npg.is_open' => 1, 'npg.is_show' => 1]),'order'=>'ng.sort desc']);
            $pintuan_list = $pintuan_list['data'];
            {/php}
            {notempty name="$pintuan_list['data']"}
			<div class="new_wrapper">
				<div class="spelling-block" style="border-radius: 8px;">
					<header>
						<div class="ns-text-color-black assemble-title">
							<img src="/template/wap/default/public/img/index/rm.png" style="width: 60%">
						</div>
						<a class="assemble-title-right" href="{:__URL('APP_MAIN/goods/pintuanList')}">更多&nbsp;&gt;</a>
					</header>

					<ul style="padding: 0px 5px">
						<div class="pin-content">
						{foreach name="$pintuan_list['data']" item="vo" key="k"}
							<div class="pin-content-li">
								<div>
									<a href="{:__URL('APP_MAIN/goods/detail?goods_id='.$vo.goods_id)}">
										<img src="{:__IMG($default_goods_img)}" data-original="{:__IMG($vo.pic_cover_mid)}" class="pic lazy" style="border-radius: 5px">
									</a>
								</div>
								<footer class="ns-border-color-gray">
									<div class="assemble-foot" style="margin-top: 5px!important;">
										<div class="assemble-foot-left" >
											 <div class="tuangou-money ns-text-color">￥{$vo.tuangou_money}</div>
										</div>
									</div>
								</footer>
							</div>
						{/foreach}
						</div>
					</ul>
				</div>
			</div>
            {/notempty}

			{php}
			$pintuan_list = api("NsPintuan.Pintuan.goodsList",['page_size'=>100,'tuan_type'=>2,'condition'=> json_encode(['npg.is_open' => 1, 'npg.is_show' => 1]),'order'=>'ng.sort desc']);
			$pintuan_list = $pintuan_list['data'];
			{/php}
			{notempty name="$pintuan_list['data']"}
				<div class="new_wrapper">
					<div class="spelling-block" style="border-radius: 8px;">
						<header>
							<div class="ns-text-color-black assemble-title">
								<img src="/template/wap/default/public/img/index/ms.png" style="width: 60%">
							</div>
							<a class="assemble-title-right" href="{:__URL('APP_MAIN/goods/spintuanList')}">更多&nbsp;&gt;</a>
						</header>

						<ul style="padding: 0px 5px">
							<div class="pin-content">
								{foreach name="$pintuan_list['data']" item="vo" key="k"}
								<div class="pin-content-li">
									<div>
										<a href="{:__URL('APP_MAIN/goods/detail?goods_id='.$vo.goods_id)}">
											<img src="{:__IMG($default_goods_img)}" data-original="{:__IMG($vo.pic_cover_mid)}" class="pic lazy" style="border-radius: 5px">
										</a>
									</div>
									<footer class="ns-border-color-gray">
										<div class="assemble-foot" style="margin-top: 5px!important;">
											<div class="assemble-foot-left" >
												<div class="tuangou-money ns-text-color">￥{$vo.tuangou_money}</div>
											</div>
										</div>
									</footer>
								</div>
								{/foreach}
							</div>
						</ul>
					</div>
				</div>
			{/notempty}
            {/if}
        {/if}

    {elseif condition="$vo['tag']=='adv'"}

        {if condition="$vo['isVisible']"}
        <!--广告位-->
        {/if}

    {elseif condition="$vo['tag']=='goods'"}

        {if condition="$vo['isVisible']"}
        <!--推荐商品（新品 精品 热卖、楼层等推荐商品）-->
            <!--推荐商品（新品 精品 热卖、楼层等推荐商品）-->
			{php}
				$new_goods_list = api("System.Goods.newGoodsList", ["page_size" => 4]);
				$new_goods_list = $new_goods_list['data'];
			{/php}
			{notempty name="$new_goods_list"}
			<!-- 新品 -->
			<div class="floor">
				<section class="members-goods-pic ns-border-color-gray">
					<ul>
						{foreach name="$new_goods_list" item="list" key='k'}
						<li class="gooditem">
							<div class="imgs">
								<a href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">
									<img class="lazy" src="{:__IMG($default_goods_img)}" data-original="{:__IMG($list['pic_cover_mid'])}" >
								</a>
							</div>
							<div class="info">
								<p class="goods-title">
									<a class="ns-text-color-black" href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">{$list.goods_name}</a>
								</p>
								<div class="goods-info">
									<span class="goods-price ns-text-color">
										{in name="$list.point_exchange_type" value="0,2"}
										<em>￥{$list.promotion_price}</em>
										{else/}
											{if $list['point_exchange_type'] == 1 && $list['promotion_price'] > 0}
												<em>￥{$list.promotion_price}+{$list.point_exchange}{:lang('goods_integral')}</em>
											{else/}
												<em>{$list.point_exchange}{:lang('goods_integral')}</em>
											{/if}
										{/in}
									</span>
									<span class="goods-rank_point ns-text-color" style="display: none">
										<em>成长值：</em>
									</span>
									<div class="add_cart" onclick="window.location.href='{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}'">
										<img src="WAP_IMG/index/add_cart.png" />
									</div>
								</div>
							</div>
						</li>
						{/foreach}
					</ul>
				</section>
			</div>
			{/notempty}
			{php}
				$recommend_goods_list = api("System.Goods.recommendGoodsList", ["page_size" => 4]);
				$recommend_goods_list = $recommend_goods_list['data'];
			{/php}
			{notempty name="$recommend_goods_list"}
			<!-- 精品 -->
			<div class="floor">
				<section class="members-goods-pic ns-border-color-gray">
					<ul>
						{foreach name="$recommend_goods_list" item="list" key='k'}
						<li class="gooditem">
							<div class="imgs">
								<a href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">
									<img class="lazy" src="{:__IMG($default_goods_img)}" data-original="{:__IMG($list['pic_cover_mid'])}" >
								</a>
							</div>
							<div class="info">
								<p class="goods-title">
									<a class="ns-text-color-black" href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">{$list.goods_name}</a>
								</p>
								<div class="goods-info">
									<span class="goods-price ns-text-color">
										{in name="$list.point_exchange_type" value="0,2"}
										<em>￥{$list.promotion_price}</em>
										{else/}
											{if $list['point_exchange_type'] == 1 && $list['promotion_price'] > 0}
												<em>￥{$list.promotion_price}+{$list.point_exchange}{:lang('goods_integral')}</em>
											{else/}
												<em>{$list.point_exchange}{:lang('goods_integral')}</em>
											{/if}
										{/in}
									</span>
									<div class="add_cart" onclick="window.location.href='{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}'">
										<img src="WAP_IMG/index/add_cart.png"  />
									</div>
								</div>
							</div>
						</li>
						{/foreach}
					</ul>
				</section>
			</div>
			{/notempty}
			{php}
				$hot_goods_list = api("System.Goods.hotGoodsList", ["page_size" => 4]);
				$hot_goods_list = $hot_goods_list['data'];
			{/php}
			{notempty name="$hot_goods_list"}
			<!-- 热卖 -->
			<div class="floor">

				<section class="members-goods-pic ns-border-color-gray">
					<ul>
						{foreach name="$hot_goods_list" item="list" key='k'}
						<li class="gooditem">
							<div class="imgs">
								<a href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">
									<img class="lazy" src="{:__IMG($default_goods_img)}" data-original="{:__IMG($list['pic_cover_mid'])}" >
								</a>
							</div>
							<div class="info">
								<p class="goods-title">
									<a class="ns-text-color-black" href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">{$list.goods_name}</a>
								</p>
								<div class="goods-info">
									<span class="goods-price ns-text-color">
										{in name="$list.point_exchange_type" value="0,2"}
										<em>￥{$list.promotion_price}</em>
										{else/}
											{if $list['point_exchange_type'] == 1 && $list['promotion_price'] > 0}
												<em>￥{$list.promotion_price}+{$list.point_exchange}{:lang('goods_integral')}</em>
											{else/}
												<em>{$list.point_exchange}{:lang('goods_integral')}</em>
											{/if}
										{/in}
									</span>
									<div class="add_cart" onclick="window.location.href='{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}'">
										<img src="WAP_IMG/index/add_cart.png" />
									</div>
								</div>
							</div>
						</li>
						{/foreach}
					</ul>
				</section>
			</div>
			{/notempty}
            {php}
            $block_list = api("System.Goods.goodsCategoryBlockWap");
            $block_list = $block_list['data'];
            {/php}
            <!-- 楼层版块 -->
            {foreach name="$block_list['data']" item="class"}
            {notempty name="$class['goods_list']"}
            <div class="floor">
                <section class="members-goods-pic ns-border-color-gray">
                    <ul>
                        {foreach name="class.goods_list" item="list" key='k'}
                        <li class="gooditem">
                            <div class="imgs">
                                <a href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">
                                    <img class="lazy" src="{:__IMG($default_goods_img)}" data-original="{:__IMG($list['pic_cover_small'])}" >
                                </a>
                            </div>
                            <div class="info">
                                <p class="goods-title">
                                    <a class="ns-text-color-black" href="{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}">{$list.goods_name}</a>
                                </p>
                                <div class="goods-info">
	                                <span class="goods-price ns-text-color">
	                                    {in name="$list.point_exchange_type" value="0,2"}
	                                    <em>￥{$list.promotion_price}</em>
	                                    {else/}
	                                        {if $list['point_exchange_type'] == 1 && $list['promotion_price'] > 0}
	                                            <em>￥{$list.promotion_price}+{$list.point_exchange}{:lang('goods_integral')}</em>
	                                        {else/}
	                                            <em>{$list.point_exchange} {:lang('goods_integral')}</em>
	                                        {/if}
	                                    {/in}
	                                </span>
                                	<div class="add_cart" onclick="window.location.href='{:__URL('APP_MAIN/goods/detail?goods_id='.$list['goods_id'])}'">
										<img src="WAP_IMG/index/add_cart.png" />
									</div>
                                </div>
                            </div>
                        </li>
                        {/foreach}
                    </ul>
                </section>
            </div>
            {/notempty}
            {/foreach}
        {/if}
    {elseif condition="$vo['tag']=='cube'"}
        {if condition="$vo['isVisible']"}
            {php}
                $magiccube = api("System.Config.wapHomeMagicCube");
                $magiccube = $magiccube['data'];
            {/php}
            {notempty name="magiccube"}
            <!-- 首页魔方 -->
            <div class="magiccube-warp">
                <div class="box">
                    {if count($magiccube) eq 1}
                        <!-- 一行一个 -->
                        <div class="layout-one">
                            <div class="item" style="width: 100%;height: 100%;">
                                {if is_url($magiccube[0]['url'])}
                                    <a href="{$magiccube[0]['url']}"  target="_blank">
                                {else/}
                                    <a href="{:__URL('APP_MAIN'.$magiccube[0]['url'])}"  target="_blank">
                                {/if}
                                    <img src="{:__IMG($magiccube[0]['imgPath'])}">
                                </a>
                            </div>
                        </div>
                    {elseif count($magiccube) eq 2}
                        <!-- 一行两个 -->
                        <div class="layout-two">
                            {for start="0" end="2" }
                            <div class="item">
                                {if is_url($magiccube[$i]['url'])}
                                    <a href="{$magiccube[$i]['url']}"  target="_blank">
                                {else/}
                                    <a href="{:__URL('APP_MAIN'.$magiccube[$i]['url'])}"  target="_blank">
                                {/if}
                                    <img src="{:__IMG($magiccube[$i]['imgPath'])}">
                                </a>
                            </div>
                            {/for}
                        </div>
                    {elseif count($magiccube) eq 3}
                        <!-- 一左两右 -->
                        <div class="layout-three">
                            <div class="left">
                                <div class="item">
                                    {if is_url($magiccube[0]['url'])}
                                        <a href="{$magiccube[0]['url']}"  target="_blank">
                                    {else/}
                                        <a href="{:__URL('APP_MAIN'.$magiccube[0]['url'])}"  target="_blank">
                                    {/if}
                                        <img src="{:__IMG($magiccube[0]['imgPath'])}">
                                    </a>
                                </div>
                            </div>
                            <div class="right">
                                {for start="1" end="3" }
                                <div class="item">
                                    {if is_url($magiccube[$i]['url'])}
                                        <a href="{$magiccube[$i]['url']}"  target="_blank">
                                    {else/}
                                        <a href="{:__URL('APP_MAIN'.$magiccube[$i]['url'])}"  target="_blank">
                                    {/if}
                                        <img src="{:__IMG($magiccube[$i]['imgPath'])}">
                                    </a>
                                </div>
                                {/for}
                            </div>
                        </div>
                    {elseif count($magiccube) eq 4}
                        <!-- 一左三右 -->
                        <div class="layout-four">
                            <div class="left">
                                <div class="item">
                                    {if is_url($magiccube[0]['url'])}
                                        <a href="{$magiccube[0]['url']}"  target="_blank">
                                    {else/}
                                        <a href="{:__URL('APP_MAIN'.$magiccube[0]['url'])}"  target="_blank">
                                    {/if}
                                        <img src="{:__IMG($magiccube[0]['imgPath'])}">
                                    </a>
                                </div>
                            </div>
                            <div class="right">
                                <div class="top">
                                    <div class="item">
                                        {if is_url($magiccube[1]['url'])}
                                            <a href="{$magiccube[1]['url']}"  target="_blank">
                                        {else/}
                                            <a href="{:__URL('APP_MAIN'.$magiccube[1]['url'])}"  target="_blank">
                                        {/if}
                                            <img src="{:__IMG($magiccube[1]['imgPath'])}">
                                        </a>
                                    </div>
                                </div>
                                <div class="buttom">
                                    {for start="2" end="4" }
                                    <div class="item">
                                        {if is_url($magiccube[$i]['url'])}
                                            <a href="{$magiccube[$i]['url']}"  target="_blank">
                                        {else/}
                                            <a href="{:__URL('APP_MAIN'.$magiccube[$i]['url'])}"  target="_blank">
                                        {/if}
                                            <img src="{:__IMG($magiccube[$i]['imgPath'])}">
                                        </a>
                                    </div>
                                    {/for}
                                </div>
                            </div>
                        </div>
                    {/if}
                </div>
            </div>
            {/notempty}
        {/if}
    {/if}
{/foreach}
<div style="height: 100px"></div>
</div>
{/block}
{block name="script"}
<script src="WAP_JS/jquery.liMarquee.js"></script>

<script src="WAP_JS/index.js"></script>
<script>
	var lang_index = {
		activity_over : "{:lang('activity_over')}",
		days : "{:lang('days')}"
	};

	var p = 0, t = 0; //上下滚动时隐藏导航栏

	$(window).scroll(function(e){

//下滑

		p =$(this).scrollTop();

		console.log(p);

		if( p <40){


			$('#search-header').addClass("tra");

		} else {

//上滑
			$('#search-header').removeClass("tra");


		}

//更新上一次的scroll值

		t = p;;

	})

</script>


{/block}
